package com.djbx.points.member.controller;

import com.djbx.points.common.core.utils.ServiceResponse;
import com.djbx.points.member.api.dto.MemberInDTO;
import com.djbx.points.member.mq.MQProducerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 会员
 *
 * @author aliuql
 * @email 17701057157@qq.com
 * @date 2021-11-15 14:30:28
 */
@Slf4j
@RestController
@RequestMapping("/mq")
public class MQController {

    @Autowired
    private MQProducerService mqProducerService;

    /**
     * 发送消息
     */
    @PostMapping("/send")
    public ServiceResponse<Void> send(@RequestBody MemberInDTO memberInDTO) {
        mqProducerService.send(memberInDTO);
        return new ServiceResponse<>();
    }

}
